package top.xxyu.resume.demo;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import top.xxyu.web.login.User;

import java.util.List;
import java.util.Map;

@Mapper
public interface MybatisDao {
    @Results({
            @Result(property="nnNn",column="NN_NN")
    })
    @Select("select * from user where id = #{id}")
    List<User> findById(User param);


    @Results({
            @Result(property="userId",column="user_id"),
            @Result(property="userName",column="user_name"),
            @Result(property="userPassword",column="user_password")
    })
    @Select("select * from user")
    public List<Map> findAll();
}
